from po.page.basepage import BasePage
from selenium.webdriver.common.by import By

class LoginPage(BasePage):
    URL = "https://www.douban.com/"
    USERNAME = (By.NAME,'phone')
    PASSWORD = (By.XPATH,'//*[@id="code"]')

    def __init__(self,driver):
        super().__init__(driver=driver,url=self.URL)

    def login(self):
        self.open()
        # self.send_key(webElement=self.find_element(*self.USERNAME),keys='aaa')
        self.send_key(webElement=self.find_element(*self.PASSWORD),keys='bbb')


from selenium import  webdriver

driver = webdriver.Chrome()
test = LoginPage(driver)
test.login()